﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Crawler.Stuff;
using Quartz;

namespace Crawler.Job
{
    public class GrowthJob : IInterruptableJob
    {
        private Thread currentThread;

        public void Execute(JobExecutionContext context)
        {
            currentThread = Thread.CurrentThread;
            new Growth().UpdateAppGrowth(new DateTime(2010, (int)context.JobDetail.JobDataMap["month"], (int)context.JobDetail.JobDataMap["day"]));
        }


        #region IInterruptableJob Members

        public void Interrupt()
        {
            currentThread.Abort();
        }

        #endregion
    }
}
